﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Avatar.Company;
using Avatar.Common;

public partial class CompanyJobList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["Company"] != null)
            {
                //int _id = Convert.ToInt32(Request.QueryString["ID"].ToString());
                string _companyName = Server.UrlDecode(Request.QueryString["Company"]);
                var _company = CompanyInformationManager.GetCompanyInformationByCompanyName(_companyName);
                if (_company != null)
                {
                    Page.Title = _company.CompanyName;
                    lbl_CompanyName.Text = _company.CompanyName;
                    lbl_CompanySize.Text = CompanySizeManager.GetCompanySize(_company.Size).Size;
                    lbl_CompanyType.Text = CompanyNatureManager.GetCompanyNature(_company.Nature).Nature;
                    lbl_Description.Text = _company.Description;
                    CompanyAddressMap1.Company = _company.User;
                    lbl_Industry.Text = IndustryManager.GetIndustry(_company.Industry).Name;

                    var _jobs = JobManager.GetJobList(_company.User,1);
                    ListView1.DataSource = _jobs;
                    ListView1.DataBind();
                }
                else
                {
                    Helper.ShowMassage("您要查看的企业信息不存在.");
                }

            }
        }
    }
}
